package com.origin.ebuy.bargd.service.user;

import java.sql.SQLException;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public interface IUserService {
	
	public int queryUserByName(String name)throws SQLException;
	
	/**
	 * 用户注册
	 * @param name
	 * @param passwd
	 * @return
	 * @throws SQLException
	 */
	public int userRegiste(String name,String passwd)throws SQLException;

	
	public JSONObject userLogin(String name,String passwd)throws SQLException;
	
	/**
	 * 查询所有的用户
	 * @return
	 * @throws SQLException
	 */
	public JSONArray queryAllUser()throws SQLException;
	
	/**
	 * 修改用户角色
	 * @param id
	 * @param rule
	 * @return
	 * @throws SQLException
	 */
	public int updateUserRole(String id,String rule)throws SQLException;
	
	public int updateUserState(String id,String state)throws SQLException;
}
